// 引入react核心包\
import React from 'react'
// 设计DOM来渲染的一个包
import ReactDom from 'react-dom'

const list = [
	{ id: 1, name: '武汉黑马前端64期', salary: 11000 },
	{ id: 2, name: '武汉黑马前端66期', salary: 13000 },
	{ id: 3, name: '武汉黑马前端68期', salary: 15000 }
]

const temp = list.map((item) => (
	<li key={item.id}>
		<p>班级:{item.name}</p>
		<p>薪资:{item.salary}</p>
	</li>
))

const ele = <ul>{temp}</ul>

// 渲染谁，渲染到哪里
ReactDom.render(ele, document.querySelector('#root'))
